package cn.fl.project.controller;

import cmm.comm.facade.framework.api.ISysDictionaryApiService;
import cmm.comm.facade.framework.dto.SysDictionaryDTO;
import cmm.mid.core.framework.page.DataResultVO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.ListPageVO;
import cmm.mid.core.framework.page.Pager;
import cmm.web.core.framework.controller.BaseController;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.constant.BaseExceptionConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.framework.constant.DictionaryConstant;
import cn.fl.preloan.enums.LogBusinessTypeEnum;
import cn.fl.product.service.ISplInfoService;
import cn.fl.product.vo.SplInfoVO;
import cn.fl.project.condition.PrjQuatPrpsAttrQueryCondition;
import cn.fl.project.constant.PrjQuatPrpsCfgMConstant;
import cn.fl.project.service.IPrjQuatPrpsAttrService;
import cn.fl.project.vo.PrjQuatPrpsAttrPageVO;
import cn.fl.project.vo.PrjQuatPrpsAttrVO;
import cn.fl.ref.fribaseinfo.service.IFriBaseInfoService;
import cn.fl.ref.fribaseinfo.transform.FriBaseInfoVOTransform;
import cn.fl.ref.fribaseinfo.utils.FundRasInsNmChangeUtil;
import cn.fl.ref.fribaseinfo.vo.FriBaseInfoVO;
import cn.fl.system.constant.SysLogConstant;
import com.alibaba.fastjson.JSON;
import com.lionbridge.log.ext.ExtSlf4jLogger;
import com.lionbridge.log.ext.ExtSlf4jLoggerBuilder;
import com.lionbridge.log.ext.LogTypeEnum;
import fl.ref.fribaseinfo.condition.FriBaseInfoQueryCondition;
import fl.ref.fribaseinfo.constant.FriBaseInfoConstant;
import fl.ref.fribaseinfo.dto.FriBaseInfoDTO;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Description: 项目报价方案配置属性表 控制层
 */
@Slf4j
@Controller
@RequestMapping("/project/prjQuatPrpsAttr")
public class PrjQuatPrpsAttrController extends BaseController{
	private static ExtSlf4jLogger logger = ExtSlf4jLoggerBuilder.create()
			.setLogger(log).setBusinessType(LogBusinessTypeEnum.QUOTATION_SCHEME.getCode())
			.setSubBusinessType(LogBusinessTypeEnum.QUOTATION_SCHEME.getCode())
			.setLogType(LogTypeEnum.BUSINESS).build().setKeywords("PrjQuatPrpsAttr");
	/**
	 * PrjQuatPrpsAttr 服务层BEAN
	 */
	@Autowired
	private IPrjQuatPrpsAttrService prjQuatPrpsAttrService;
	
	/**
	 * 本地数据字典服务
	 */
	@Autowired
	private ISysDictionaryApiService sysDictionaryApiService;
	
	/**
	 * 供应商本地服务
	 */
	@Autowired
	private ISplInfoService splInfoService;

	@Autowired
	IFriBaseInfoService friBaseInfoService;

	/**
	 * 到列表页面
	 */
	@RequestMapping(value = "/toListPage.do", method = { RequestMethod.GET})
	public ModelAndView toListPage(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView view = new ModelAndView("project/prjQuatPrpsAttr/list");
		return view;
	}

	/**
	 * 获取省市下拉树数据
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/getRegionTreeData.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object getRegionTreeData(HttpServletRequest request, HttpServletResponse response) {
		
		try {
			JSONArray jsonArray =this.prjQuatPrpsAttrService.searchRegionJSONArray();
			return jsonArray;
		} catch (Exception e) {
			logger.error("项目报价方案配置属性表，获取省市下拉树数据失败.msg:{}",e.getMessage());
		}
		return null;
	}
	
	/**
	 * 到新增/修改页面
	 */
	@RequestMapping(value = "/toAddPage.do", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView toAddPage(HttpServletRequest request, HttpServletResponse response) {
		String prpsCfgId = request.getParameter("prpsCfgId");
		ModelAndView view = new ModelAndView("project/prjQuatPrpsAttr/prjQuatPrpsAttrAdd");
		//获取下拉框数据
		//业务类型
		List<KeyValueVO> businessTypCdList = this.prjQuatPrpsAttrService.searchBusinessTypCdList();
		view.addObject("businessTypCdListJOSN", JSONArray.fromObject(businessTypCdList));
		//项目类型
		List<KeyValueVO> prjTypCdList = this.prjQuatPrpsAttrService.searchPrjTypCdList();
		view.addObject("prjTypCdListJSON", JSONArray.fromObject(prjTypCdList));
		//业务来源
		List<KeyValueVO> bizResCdList = this.prjQuatPrpsAttrService.searchBizResCdList();
		view.addObject("bizResCdListJSON", JSONArray.fromObject(bizResCdList));
		//经销商类型
		List<KeyValueVO> splTypCdList = this.prjQuatPrpsAttrService.searchSplTypCdList();
		view.addObject("splTypCdListJSON", JSONArray.fromObject(splTypCdList));
		//是否团单
		List<KeyValueVO> yesOrNoCdList = this.prjQuatPrpsAttrService.searchYesOrNoCdList();
		view.addObject("yesOrNoCdListJSON", JSONArray.fromObject(yesOrNoCdList));
		//产品品牌
		List<KeyValueVO> brCdList = this.prjQuatPrpsAttrService.searchBrCdList();
		view.addObject("brCdListJSON", JSONArray.fromObject(brCdList));
		//省级区域
		List<KeyValueVO> regionProvinceList = this.prjQuatPrpsAttrService.searchRegionProvinceList();
		view.addObject("regionProvinceListJSON", JSONArray.fromObject(regionProvinceList));
		
		view.addObject("prpsCfgId", prpsCfgId);
		logger.info("项目报价方案配置属性表，跳转到新增/修改页面prpsCfgId:{}", prpsCfgId);
		//供应商数据
		String splIdsString = "",splIdsStringNm = "";
		if(StringUtils.isNotEmpty(prpsCfgId)){
			PrjQuatPrpsAttrPageVO prjQuatPrpsAttrPageVO = this.prjQuatPrpsAttrService.selectPrjQuatPrpsAttrPageVOById(Long.valueOf(prpsCfgId));
			if(null!=prjQuatPrpsAttrPageVO){
				splIdsString = prjQuatPrpsAttrPageVO.getSplIds();
				if(StringUtils.isNotEmpty(splIdsString)){
					String[] strings = splIdsString.split(";");
					for (String string : strings) {
						SplInfoVO splInfoVO = this.splInfoService.selectById(Long.valueOf(string));
						splIdsStringNm+=splInfoVO.getSplNm();
						splIdsStringNm+=";";
					}
					splIdsStringNm = splIdsStringNm.substring(0, splIdsStringNm.length()-1);
				}
			}
		}
		view.addObject("splIdsString", splIdsString);
		view.addObject("splIdsStringNm", splIdsStringNm);
		//型号数据
		String prdMdlsString = "",prdMdlsStringNm = "";
		if(StringUtils.isNotEmpty(prpsCfgId)){
			PrjQuatPrpsAttrPageVO prjQuatPrpsAttrPageVO = this.prjQuatPrpsAttrService.selectPrjQuatPrpsAttrPageVOById(Long.valueOf(prpsCfgId));
			if(null!=prjQuatPrpsAttrPageVO){
				prdMdlsString = prjQuatPrpsAttrPageVO.getPrdMdls();
				prdMdlsStringNm = prjQuatPrpsAttrPageVO.getPrdMdls();
			}
		}
		view.addObject("prdMdlsString", prdMdlsString);
		view.addObject("prdMdlsStringNm", prdMdlsStringNm);
		//业务线字典List
		List<KeyValueVO> bussinessLineDicList = sysDictionaryApiService.getKvList("REF0048","11000","0000");

		//所属机构
		Pager page = new Pager();
		page.setCurrentPage(1);
		page.setEveryPage(Integer.MAX_VALUE);
		FriBaseInfoQueryCondition qc = new FriBaseInfoQueryCondition();
		qc.setInsSts(FriBaseInfoConstant.FRI_BASE_INFO_INS_STS_PASS);
		qc.setInsUseCd("2");
		qc.setSysCd(CurrentThreadContext.getCurrentSysCd());
		qc.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
		page.setCondition(qc);
		Pager pager = this.friBaseInfoService.searchListPage(page);
		//List<FriBaseInfoVO> list = (List<FriBaseInfoVO>) pager.getResultList();
		List<FriBaseInfoVO> list = FriBaseInfoVOTransform.toVOList((List<FriBaseInfoDTO>) pager.getResultList());
		//根据金融机构业务线,设置金融机构名称展示字段值
		FundRasInsNmChangeUtil.insNmShowAddBussinessLineDic(list,bussinessLineDicList);
		view.addObject("friBaseList", JSONArray.fromObject(list));
		logger.info("项目报价方案配置属性表，查询资管机构list:{}", JSON.toJSONString(list));
		return view;
	}
	

	/**
	 * 到列表页面
	 */
	@RequestMapping(value = "/toDetailPage.do", method = { RequestMethod.GET})
	public ModelAndView toDetailPage(HttpServletRequest request, HttpServletResponse response) {
		String prpsCfgId = request.getParameter("prpsCfgId");
		ModelAndView view = new ModelAndView("project/prjQuatPrpsAttr/prjQuatPrpsAttrDetail");
		view.addObject("prpsCfgId", prpsCfgId);
		logger.info("项目报价方案配置属性表，跳转到详情页面prpsCfgId", prpsCfgId);
		return view;
	}

	/**
	 * 初始化列表
	 */
	@SuppressWarnings("unchecked")
	@RequestMapping(value = "/initList.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object initList(HttpServletRequest request, HttpServletResponse response) {
		String currentPage = request.getParameter("page");
		String pageSize = request.getParameter("pagesize");
		String searchName = request.getParameter("demo.name");
		Pager page = new Pager();
		if (StringUtils.isNotEmpty(currentPage)) {
			page.setCurrentPage(Integer.parseInt(currentPage));
		}

		if (StringUtils.isNotEmpty(currentPage)) {
			page.setEveryPage(Integer.parseInt(pageSize));
		}

		PrjQuatPrpsAttrQueryCondition qc = new PrjQuatPrpsAttrQueryCondition();
		if (StringUtils.isNotEmpty(searchName)) {
		}
		page.setCondition(qc);

		Pager pager = new Pager();//this.prjQuatPrpsAttrService.searchListPage(page);
		List<PrjQuatPrpsAttrVO> list = (List<PrjQuatPrpsAttrVO>) pager.getResultList();
		ListPageVO<PrjQuatPrpsAttrVO> listPage = new ListPageVO<PrjQuatPrpsAttrVO>(list, pager.getTotalCount());
		logger.info("项目报价方案配置属性表，查询列表数据完成result:{}", JSON.toJSONString(listPage));
		return listPage;
	}

	/**
	 * 删除数据
	 */
	@RequestMapping(value = "/removeById.do", method = {RequestMethod.POST })
	@ResponseBody
	public DataResultVO removeById(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String id = request.getParameter("id");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_DELETE_SUCC);
		if(StringUtils.isEmpty(id)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			return result;
		}
		try {
			logger.info("项目报价方案配置属性表，删除数据id:{}",id);
			this.prjQuatPrpsAttrService.removeById(Long.valueOf(id));
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			logger.error("项目报价方案配置属性表，删除数据失败id:{},msg:{}", id,ex.getMessage());
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			logger.error("项目报价方案配置属性表，删除数据,系统异常id:{},msg:{}", id,ex.getMessage());
		}

		return result;
	}

	/**
	 * 得到一条记录
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/getById.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object getById(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String prpsCfgId = request.getParameter("prpsCfgId");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if(StringUtils.isEmpty(prpsCfgId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			logger.info("项目报价方案配置属性表，获取详情,id为空");
			return result;
		}
		
		try {
			PrjQuatPrpsAttrPageVO prjQuatPrpsAttrPageVO = this.prjQuatPrpsAttrService.selectPrjQuatPrpsAttrPageVOById(Long.valueOf(prpsCfgId));
			result.setData(prjQuatPrpsAttrPageVO);
			logger.info("项目报价方案配置属性表，获取详情result:{}", JSON.toJSONString(result));
		}catch(BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			logger.error("项目报价方案配置属性表，获取详情,业务异常，msg:{}",ex.getMessage());
		}catch(Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			logger.error("项目报价方案配置属性表，获取详情,系统异常,msg:{}",ex.getMessage());
		}
		return result;
	}

	/**
	 * 新增
	 */
	@RequestMapping(value = "/add.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object add(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		List<PrjQuatPrpsAttrVO> prjQuatPrpsAttrVOList = new ArrayList<PrjQuatPrpsAttrVO>();
		String prpsCfgId = request.getParameter("prpsCfgId");
		if(StringUtils.isEmpty(prpsCfgId)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			logger.info("项目报价方案配置属性表，新增数据,参数为空");
			return result;
		}
		try {
			prjQuatPrpsAttrVOList = this.getRequestParamForPrjQuatPrpsAttrAdd(request);
			Boolean success = this.prjQuatPrpsAttrService.addBatch(prjQuatPrpsAttrVOList,Long.valueOf(prpsCfgId));
			if(!success){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
			}
			logger.info("项目报价方案配置属性表，新增数据,返回结果result:{}", JSON.toJSONString(result));
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			logger.error("项目报价方案配置属性表，新增数据,业务异常,msg:{}",ex.getMessage());
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			logger.error("项目报价方案配置属性表，新增数据,系统异常,msg:{}",ex.getMessage());
		}

		return result;
	}

	/**
	 * 修改
	 */
	@RequestMapping(value = "/modify.do", method = { RequestMethod.POST })
	@ResponseBody
	public Object modify(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String id = request.getParameter("id");
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_UPDATE_SUCC);
		if(StringUtils.isEmpty(id)){
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_DATA_PK_IS_EMPTY);
			logger.info("项目报价方案配置属性表，修改数据,id为空");
			return result;
		}
		PrjQuatPrpsAttrVO entity = null;
		try {
			entity = new PrjQuatPrpsAttrVO();
			entity.setId(Long.valueOf(id));
			//entity.setName(name);
			boolean success = this.prjQuatPrpsAttrService.modify(entity);
			if(!success){
				result.setSuccess(BaseConstant.IS_YESNO_NO);
				result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
				logger.info("项目报价方案配置属性表，修改数据失败entity:{}", JSON.toJSONString(entity));
			}
			logger.info("项目报价方案配置属性表，修改数据entity:{}", JSON.toJSONString(entity));
		}catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			logger.error("项目报价方案配置属性表，修改数据失败entity:{},msg:{}", JSON.toJSONString(entity),ex.getMessage());
		}catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			logger.error("项目报价方案配置属性表，修改数据失败,msg:{}",ex.getMessage());
		}
		return result;
	}
	/**
	 * 获取组织结构下拉树 数据
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/getOrgCdDataForSearch.do", method = { RequestMethod.GET})
	@ResponseBody
	public Object getOrgCdDataForSearch(HttpServletRequest request, HttpServletResponse response) {
		try {
			JSONArray jsonArray = this.prjQuatPrpsAttrService.searchOrgCdJSONArray();
			return jsonArray;
		} catch (Exception e) {
			logger.error("获取组织结构下拉树数据失败,msg:{}",e.getMessage());
		}
		return null;
	}
	
	//**************************************************私有方法************************************************/
	
	/**
	 * 获取请求参数
	 * @param request
	 * @return
	 * @throws BaseException
	 */
	private List<PrjQuatPrpsAttrVO> getRequestParamForPrjQuatPrpsAttr(HttpServletRequest request) throws BaseException {
		String prpsCfgId = request.getParameter("prpsCfgId");//方案配置ID
		if(StringUtils.isEmpty(prpsCfgId)){
			throw new BaseException(BaseExceptionConstant.BASE_EXCEPTION_CODE_604, "方案配置ID不能为空！");
		}
		String bizTypCd_attrCd = "", bizTypCd_attrNm = "", prjTypCd_attrCd = "", prjTypCd_attrNm = "",
		       bizResCd_attrCd = "", bizResCd_attrNm = "", splTypCd_attrCd = "", splTypCd_attrNm = "",
		       isGrpOrder_attrCd = "", isGrpOrder_attrNm = "", brCd_attrCd = "", brCd_attrNm = "",
		       orgCd_attrCd = "", prdTypCd_attrNm = "", splIds_attrCd = "", splIds_attrNm = "",
		       prdMdls_attrCd = "", prdMdls_attrNm = "", prdTypCd_attrCd = "", orgCd_attrNm = "",
		       rgnPrCd_attrCd="",rgnPrCd_attrNm="",rgnCyCd_attrCd="",rgnCyCd_attrNm="",
                friBaseOrgCd_attrCd = "",friBaseOrgCd_attrNm = "";
		List<SysDictionaryDTO> searchGroup = this.sysDictionaryApiService.searchGroup(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), DictionaryConstant.CODE_PRJ_QUAT_CFG_ATTR_CD);
		if(CollectionUtils.isNotEmpty(searchGroup)){
			for (SysDictionaryDTO sysDictionaryDTO : searchGroup) {
				if("bizTypCd".equals(sysDictionaryDTO.getCodeAttr1())){//业务类型bizTypCd
					bizTypCd_attrCd = sysDictionaryDTO.getCode();
					bizTypCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("prjTypCd".equals(sysDictionaryDTO.getCodeAttr1())){//项目类型prjTypCd
					prjTypCd_attrCd = sysDictionaryDTO.getCode();
					prjTypCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("bizResCd".equals(sysDictionaryDTO.getCodeAttr1())){//业务来源bizResCd
					bizResCd_attrCd = sysDictionaryDTO.getCode();
					bizResCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("splTypCd".equals(sysDictionaryDTO.getCodeAttr1())){//供应商类型splTypCd
					splTypCd_attrCd = sysDictionaryDTO.getCode();
					splTypCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("isGrpOrder".equals(sysDictionaryDTO.getCodeAttr1())){//是否团单isGrpOrder
					isGrpOrder_attrCd = sysDictionaryDTO.getCode();
					isGrpOrder_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("brCd".equals(sysDictionaryDTO.getCodeAttr1())){//产品品牌brCd
					brCd_attrCd = sysDictionaryDTO.getCode();
					brCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("prdTypCd".equals(sysDictionaryDTO.getCodeAttr1())){//产品类型prdTypCd
					prdTypCd_attrCd = sysDictionaryDTO.getCode();
					prdTypCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("orgCd".equals(sysDictionaryDTO.getCodeAttr1())){//组织架构orgCd
					orgCd_attrCd = sysDictionaryDTO.getCode();
					orgCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("splIds".equals(sysDictionaryDTO.getCodeAttr1())){//供应商splIds
					splIds_attrCd = sysDictionaryDTO.getCode();
					splIds_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("prdMdl".equals(sysDictionaryDTO.getCodeAttr1())){//产品型号prdMdls
					prdMdls_attrCd = sysDictionaryDTO.getCode();
					prdMdls_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("rgnPrCd".equals(sysDictionaryDTO.getCodeAttr1())){//产品型号prdMdls
					rgnPrCd_attrCd = sysDictionaryDTO.getCode();
					rgnPrCd_attrNm = sysDictionaryDTO.getCodeNm();
				}else if("rgnCyCd".equals(sysDictionaryDTO.getCodeAttr1())){//产品型号prdMdls
					rgnCyCd_attrCd = sysDictionaryDTO.getCode();
					rgnCyCd_attrNm = sysDictionaryDTO.getCodeNm();
				} else if ("friBaseOrgCd".equals(sysDictionaryDTO.getCodeAttr1())) {
				    friBaseOrgCd_attrCd = sysDictionaryDTO.getCode();
                    friBaseOrgCd_attrNm = sysDictionaryDTO.getCodeNm();
                }
			}
		}
		List<PrjQuatPrpsAttrVO> prjQuatPrpsAttrVOList = new ArrayList<PrjQuatPrpsAttrVO>();

        /***********所属机构**********/
        String friBaseOrgCd = request.getParameter("friBaseOrgCd");
        String friBaseOrgCd_flag = request.getParameter("friBaseOrgCd_flag");
        if(StringUtils.isNotEmpty(friBaseOrgCd)){
            List<String> friBaseOrgCdList = new ArrayList<String>();
            String[] friBaseOrgCdStr = friBaseOrgCd.split(";");
            if(friBaseOrgCdStr.length > 0){
                for (String str : friBaseOrgCdStr) {
                    friBaseOrgCdList.add(str);
                }
            }
            if(CollectionUtils.isNotEmpty(friBaseOrgCdList)){
                if("true".equals(friBaseOrgCd_flag)){
                    friBaseOrgCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
                }else{
                    friBaseOrgCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
                }
                for (String string : friBaseOrgCdList) {
                    PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
                    prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
                    prjQuatPrpsAttrVO.setAttrTypCd(friBaseOrgCd_flag);//属性类型-属性值
                    prjQuatPrpsAttrVO.setAttrCd(friBaseOrgCd_attrCd);//属性代码
                    prjQuatPrpsAttrVO.setAttrNm(friBaseOrgCd_attrNm);//属性名称
                    prjQuatPrpsAttrVO.setAttrVal(string);//属性值
                    prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
                }
            }
        }

		/***********省**********/
		String rgnPrCd = request.getParameter("rgnPrCd");
		String rgnPrCd_flag = request.getParameter("rgnPrCd_flag");
		if(StringUtils.isNotEmpty(rgnPrCd)){
			List<String> rgnPrCdList = new ArrayList<String>();
			String[] rgnPrCdStr = rgnPrCd.split(";");
			if(rgnPrCdStr.length>0){
				for (String str : rgnPrCdStr) {
					rgnPrCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(rgnPrCdList)){
				if("true".equals(rgnPrCd_flag)){
					rgnPrCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					rgnPrCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : rgnPrCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(rgnPrCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(rgnPrCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(rgnPrCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/***********市**********/
		String rgnCyCd = request.getParameter("rgnCyCd");
		String rgnCyCd_flag = request.getParameter("rgnCyCd_flag");
		if(StringUtils.isNotEmpty(rgnCyCd)){
			List<String> rgnCyCdList = new ArrayList<String>();
			String[] rgnCyCdStr = rgnCyCd.split(";");
			if(rgnCyCdStr.length>0){
				for (String str : rgnCyCdStr) {
					rgnCyCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(rgnCyCdList)){
				if("true".equals(rgnCyCd_flag)){
					rgnCyCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					rgnCyCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : rgnCyCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(rgnCyCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(rgnCyCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(rgnCyCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/***********业务类型**********/
		String bizTypCd = request.getParameter("bizTypCd");//业务类型
		String bizTypCd_flag = request.getParameter("bizTypCd_flag");//业务类型是否参与方案配置标识
		if(StringUtils.isNotEmpty(bizTypCd)){
			List<String> bizTypCdList = new ArrayList<String>();
			String[] bizTypCdStr = bizTypCd.split(";");
			if(bizTypCdStr.length>0){
				for (String str : bizTypCdStr) {
					bizTypCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(bizTypCdList)){
				if("true".equals(bizTypCd_flag)){
					bizTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					bizTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : bizTypCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(bizTypCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(bizTypCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(bizTypCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(bizTypCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(bizTypCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(bizTypCd_attrNm);//属性名称
			if("true".equals(bizTypCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********项目类型**********/
		String prjTypCd = request.getParameter("prjTypCd");//项目类型
		String prjTypCd_flag = request.getParameter("prjTypCd_flag");//项目类型是否参与方案配置标识
		if(StringUtils.isNotEmpty(prjTypCd)){
			List<String> prjTypCdList = new ArrayList<String>();
			String[] prjTypCdStr = prjTypCd.split(";");
			if(prjTypCdStr.length>0){
				for (String str : prjTypCdStr) {
					prjTypCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(prjTypCdList)){
				if("true".equals(prjTypCd_flag)){
					prjTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					prjTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : prjTypCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(prjTypCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(prjTypCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(prjTypCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(prjTypCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(prjTypCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(prjTypCd_attrNm);//属性名称
			if("true".equals(prjTypCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********业务来源**********/
		String bizResCd = request.getParameter("bizResCd");//业务来源
		String bizResCd_flag = request.getParameter("bizResCd_flag");//业务来源是否参与方案配置标识
		if(StringUtils.isNotEmpty(bizResCd)){
			List<String> bizResCdList = new ArrayList<String>();
			String[] bizResCdStr = bizResCd.split(";");
			if(bizResCdStr.length>0){
				for (String str : bizResCdStr) {
					bizResCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(bizResCdList)){
				if("true".equals(bizResCd_flag)){
					bizResCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					bizResCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : bizResCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(bizResCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(bizResCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(bizResCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(bizResCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(bizResCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(bizResCd_attrNm);//属性名称
			if("true".equals(bizResCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********供应商类型**********/
		String splTypCd = request.getParameter("splTypCd");//供应商类型
		String splTypCd_flag = request.getParameter("splTypCd_flag");//供应商类型是否参与方案配置标识
		if(StringUtils.isNotEmpty(splTypCd)){
			List<String> splTypCdList = new ArrayList<String>();
			String[] splTypCdStr = splTypCd.split(";");
			if(splTypCdStr.length>0){
				for (String str : splTypCdStr) {
					splTypCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(splTypCdList)){
				if("true".equals(splTypCd_flag)){
					splTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					splTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : splTypCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(splTypCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(splTypCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(splTypCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(splTypCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(splTypCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(splTypCd_attrNm);//属性名称
			if("true".equals(splTypCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********是否团单**********/
		String isGrpOrder = request.getParameter("isGrpOrder");//是否团单
		String isGrpOrder_flag = request.getParameter("isGrpOrder_flag");//是否团单是否参与方案配置标识
		if(StringUtils.isNotEmpty(isGrpOrder)){
			List<String> isGrpOrderList = new ArrayList<String>();
			String[] isGrpOrderStr = isGrpOrder.split(";");
			if(isGrpOrderStr.length>0){
				for (String str : isGrpOrderStr) {
					isGrpOrderList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(isGrpOrderList)){
				if("true".equals(isGrpOrder_flag)){
					isGrpOrder_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					isGrpOrder_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : isGrpOrderList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(isGrpOrder_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(isGrpOrder_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(isGrpOrder_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(isGrpOrder_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(isGrpOrder_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(isGrpOrder_attrNm);//属性名称
			if("true".equals(isGrpOrder_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********产品品牌**********/
		String brCd = request.getParameter("brCd");//产品品牌
		String brCd_flag = request.getParameter("brCd_flag");//产品品牌是否参与方案配置标识
		if(StringUtils.isNotEmpty(brCd)){
			List<String> brCdList = new ArrayList<String>();
			String[] brCdStr = brCd.split(";");
			if(brCdStr.length>0){
				for (String str : brCdStr) {
					brCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(brCdList)){
				if("true".equals(brCd_flag)){
					brCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					brCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : brCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(brCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(brCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(brCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(brCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(brCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(brCd_attrNm);//属性名称
			if("true".equals(brCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********产品类型**********/
		String prdTypCd = request.getParameter("prdTypCd");//产品类型
		String prdTypCd_flag = request.getParameter("prdTypCd_flag");//产品类型是否参与方案配置标识
		if(StringUtils.isNotEmpty(prdTypCd)){
			List<String> prdTypCdList = new ArrayList<String>();
			String[] prdTypCdStr = prdTypCd.split(";");
			if(prdTypCdStr.length>0){
				for (String str : prdTypCdStr) {
					prdTypCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(prdTypCdList)){
				if("true".equals(prdTypCd_flag)){
					prdTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					prdTypCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : prdTypCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(prdTypCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(prdTypCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(prdTypCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(prdTypCd_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(prdTypCd_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(prdTypCd_attrNm);//属性名称
			if("true".equals(prdTypCd_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********组织架构**********/
		String orgCd = request.getParameter("orgCd");//组织架构
		String orgCd_flag = request.getParameter("orgCd_flag");//组织架构是否参与方案配置标识
		if(StringUtils.isNotEmpty(orgCd)){
			List<String> orgCdList = new ArrayList<String>();
			String[] orgCdStr = orgCd.split(";");
			if(orgCdStr.length>0){
				for (String str : orgCdStr) {
					orgCdList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(orgCdList)){
				if("true".equals(orgCd_flag)){
					orgCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					orgCd_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : orgCdList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(orgCd_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(orgCd_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(orgCd_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/***********供应商**********/
		String splIds = request.getParameter("splIds");//供应商
		String splIds_flag = request.getParameter("splIds_flag");//供应商是否参与方案配置标识
		if(StringUtils.isNotEmpty(splIds)){
			List<String> splIdsList = new ArrayList<String>();
			String[] splIdsStr = splIds.split(";");
			if(splIdsStr.length>0){
				for (String str : splIdsStr) {
					splIdsList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(splIdsList)){
				if("true".equals(splIds_flag)){
					splIds_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					splIds_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : splIdsList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(splIds_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(splIds_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(splIds_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(splIds_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(splIds_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(splIds_attrNm);//属性名称
			if("true".equals(splIds_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		/***********产品型号**********/
		String prdMdls = request.getParameter("prdMdls");//产品型号
		String prdMdls_flag = request.getParameter("prdMdls_flag");//产品型号是否参与方案配置标识
		if(StringUtils.isNotEmpty(prdMdls)){
			List<String> prdMdlsList = new ArrayList<String>();
			String[] prdMdlsStr = prdMdls.split(";");
			if(prdMdlsStr.length>0){
				for (String str : prdMdlsStr) {
					prdMdlsList.add(str);
				}
			}
			if(CollectionUtils.isNotEmpty(prdMdlsList)){
				if("true".equals(prdMdls_flag)){
					prdMdls_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES;
				}else{
					prdMdls_flag = PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO;
				}
				for (String string : prdMdlsList) {
					PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
					prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
					prjQuatPrpsAttrVO.setAttrTypCd(prdMdls_flag);//属性类型-属性值
					prjQuatPrpsAttrVO.setAttrCd(prdMdls_attrCd);//属性代码
					prjQuatPrpsAttrVO.setAttrNm(prdMdls_attrNm);//属性名称
					prjQuatPrpsAttrVO.setAttrVal(string);//属性值
					prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
				}
			}
		}
		/*if(StringUtils.isNotEmpty(prdMdls_flag)){
			PrjQuatPrpsAttrVO prjQuatPrpsAttrVO = new PrjQuatPrpsAttrVO();
			prjQuatPrpsAttrVO.setPrpsCfgId(Long.valueOf(prpsCfgId));
			prjQuatPrpsAttrVO.setAttrTypCd(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE);//属性类型-属性标识
			prjQuatPrpsAttrVO.setAttrCd(prdMdls_attrCd);//属性代码
			prjQuatPrpsAttrVO.setAttrNm(prdMdls_attrNm);//属性名称
			if("true".equals(prdMdls_flag)){
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_YES);
			}else{
				prjQuatPrpsAttrVO.setAttrVal(PrjQuatPrpsCfgMConstant.CODE_PRJ_QUAT_ATTR_TYP_CODE_VAL_NO);
			}
			prjQuatPrpsAttrVOList.add(prjQuatPrpsAttrVO);
		}*/
		
		return prjQuatPrpsAttrVOList;
	}
	
	/**
	 * 获取请求参数(新增)
	 * @param request
	 * @return 
	 */
	private List<PrjQuatPrpsAttrVO> getRequestParamForPrjQuatPrpsAttrAdd(HttpServletRequest request)throws BaseException{
		List<PrjQuatPrpsAttrVO> prjQuatPrpsAttrList = this.getRequestParamForPrjQuatPrpsAttr(request);		if(CollectionUtils.isNotEmpty(prjQuatPrpsAttrList)){
			for (PrjQuatPrpsAttrVO prjQuatPrpsAttrVO : prjQuatPrpsAttrList) {
				prjQuatPrpsAttrVO.setCrtTm(new Date());
				prjQuatPrpsAttrVO.setCrtUsrId(CurrentThreadContext.getCurrentUserId());
			}
		}
		return prjQuatPrpsAttrList;
	}
	
	/**
	 * 获取请求参数(修改)
	 * @param request
	 * @return 
	 */
	/*private List<PrjQuatPrpsAttrVO> getRequestParamForPrjQuatPrpsAttrModify(HttpServletRequest request)throws BaseException{
		List<PrjQuatPrpsAttrVO> prjQuatPrpsAttrList = this.getRequestParamForPrjQuatPrpsAttr(request);
		if(CollectionUtils.isNotEmpty(prjQuatPrpsAttrList)){
			for (PrjQuatPrpsAttrVO prjQuatPrpsAttrVO : prjQuatPrpsAttrList) {
				prjQuatPrpsAttrVO.setMdfTm(new Date());
				prjQuatPrpsAttrVO.setMdfUsrId(CurrentThreadContext.getCurrentUserId());
			}
		}
		return prjQuatPrpsAttrList;
	}*/
}

